import { AxiosResponse } from 'axios';
import NetConfig from '@/config/net';

// 判断请求结果状态是否成功
export const isSuccessCode = (data: AxiosResponse): boolean => {
  // @ts-ignore
  if (NetConfig.successCode.indexOf(data[NetConfig.statusName]) !== -1) {
    return true;
  }
  return false;
};
